<!doctype html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />		
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta charset="utf-8">
<link rel="stylesheet" href="{MODULE_URL}resource/css/style.css" />
{if $color!=""}
<link rel="stylesheet" href="{MODULE_URL}resource/css/{$color}.css" />
{/if}
<script type="text/javascript" src="{MODULE_URL}resource/js/jquery-2.1.4.min.js" ></script>
<title>我的成绩</title>
{php echo register_jssdk();}
</head>
<body>
<div class="resultBox">
  
  <!-- <div class="avatar">
  	<img src="{$headimg}">
  </div> -->
  <div class="info">
  	<!-- <p class="tc">{$nick}</p> -->
  	<!-- 
  	<p><i class="iconfont">&#xe604;</i> 分数：<span>{$points}</span></p>
  	<p><i class="iconfont">&#xe603;</i> 用时：<span>{$sytime}</span>秒</p>
  	 -->
  	
  	
 {if $userinfo[points]==0} 
 <img class="img-result" src="{MODULE_URL}resource/images/error.png"" alt="">
 <p><a href="{php echo $this->createMobileUrl('index',array('rid'=>$rid));}">很遗憾答题失败,点击返回首页 </a></p>
 
 {/if}
 
  	{if $userinfo[points]>0 && $usershare }  <img class="img-result" src="{MODULE_URL}resource/images/success.png"" alt="">
  	<p><a href="{php echo $this->createMobileUrl('index',array('rid'=>$rid));}">恭喜您成功领取宝藏,点击返回首页</a></p>
  	{/if}
  	
  	{if !$usershare && $userinfo[points]>0}  <img class="img-result" src="{MODULE_URL}resource/images/success.png"" alt="">
  	<p><a href="{php echo $this->createMobileUrl('goshare',array('rid'=>$rid));}">您还没有分享答案揭秘无法领取宝藏,点击这里去分享</a></p>
  	{/if}
  	
  </div>
  
  <!-- 
  
   <div class="btn">
  	<ul class="flex">
  		<li><a href="#" class="again" onclick="startto()"><i class="iconfont">&#xe608;</i> 重新回答<i class="count">{$shyucount}</i></a>
  		{if $isshareadd==1}{if $is_max==0}<p>每邀请一个好友答题，可以增加一次答题机会</p>{else}<p>您的分享次数已用完，谢谢您参与答题</p>{/if}{/if}</li>
  	</ul>
  	<ul class="flex">
  		<li><a href="{php echo $this->createMobileUrl('ranking',array('rid'=>$rid));}"><i class="iconfont">&#xe602;</i> 排行榜</a></li>
  		<li><a href="javaScript:;" class="share"><i class="iconfont">&#xe605;</i> 呼唤朋友</a></li>
  	</ul>
  </div>
   -->
 
</div>

<!--问答提示 start-->
<div class="result" id="nocount" style="display:none;">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<div class="txt"><p><i class="iconfont">&#xe607;</i></p><p>您没有答题的机会了</p>{if $isshareadd==1}{if $is_max==0}<p>每邀请一个好友答题，可以增加一次答题机会</p>{else}<p>您的分享次数已用完，谢谢您参与答题</p>{/if}{/if}</div>
		<div class="btn">
			<ul class="flex">
				<li><a href="{php echo $this->createMobileUrl('ranking',array('rid'=>$rid));}"><i class="iconfont">&#xe602;</i> 排行榜</a></li>
				<li><a href="javaScript:;" class="red share"><i class="iconfont">&#xe605;</i>呼唤朋友</a></li>
			</ul>
		</div>
	</div>
</div>
<!--问答提示 end-->
<div class="result" id="jldiv" style="display:none;">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<div class="txt" style="color:red;"><p><i class="iconfont">&#xe607;</i></p><p>{$jlcontent}</p></div>
		<div class="btn">
			<ul class="flex">
				<li><a href="#" onclick="lingjiang()">立即领奖</a></li>
			</ul>
		</div>
	</div>
</div>
<!--核销-->
<div class="imInfo" style="display: none;" id="hxdiv">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<h2>请输入领奖码</h2>
		<div class="txt" id="errortxt">此领奖码由商家输入！</div>
		<ul>
			<li><input type="text" placeholder="请输入领奖码" id="hxnum"></li>
		</ul>
		<div class="btn"><a href="#" onclick="hexiao()">核销</a></div>
	</div>
</div>
<!--核销提示 end-->
<div class="result" id="hxres" style="display:none;">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<div class="txt" style="color:red;"><p><i class="iconfont">&#xe607;</i></p><p>核销成功</p></div>
	</div>
</div>
<!--share-->
<div class="tips"><img src="{MODULE_URL}resource/images/guide.gif" width="100%"></div>
<script>
$(document).ready(function(){
	$(".share,.tips").click(function(){
		$(".tips").toggle(0);
	})
	
	$(".close").click(function(){
		$(this).closest(".result").hide(0);
	})
	$(".close").click(function(){
		$(this).closest("#hxdiv").hide(0);
	})
	//debugger;
	<!-- var ljstatus={$ljstatus}; -->
	<!-- var points={$points}; -->
	<!-- var isjl={$isjl}; -->
	<!-- var jltype={$jltype}; -->
	<!-- var jlnum={$jlnum}; -->
	<!-- if(isjl==1){ -->
		<!-- if(ljstatus==0 || ljstatus==""){ -->
			<!-- if(jltype==0){ -->
				<!-- //$("#jldiv").show(); -->
			<!-- }else{ -->
				<!-- if(points>=jlnum){ -->
					<!-- $("#jldiv").show(); -->
				<!-- } -->
			<!-- } -->
		<!-- } -->
	<!-- } -->
})
function startto(){
	if(parseInt({$shyucount})==0){
		$("#nocount").show();
	}else{
		var url="{php echo $this->createMobileUrl('dati')}";
		var rid='{$rid}';
		var fromid='{$fromid}';
		location.href=url+"&rid="+rid+"&fromid="+fromid;
	}
}

function lingjiang(){
	$("#jldiv").hide();
	$("#hxdiv").show();
}

function hexiao(){
	var hxnum=$("#hxnum").val();
	var url="{php echo $this->createMobileUrl('hexiao',array('id'=>$id,'rid'=>$rid))}&hxnum="+hxnum;
	$.post(url, {},function(data){
			if(data.success==1){
				$("#hxdiv").hide();
				$("#hxres").show();
			}else{
				$("#errortxt").html(data.msg);
			}
   	},"json");
}

wx.ready(function(){
   sharedata = {
       title: "{$sharetitle} ",
       desc: "{$sharecontent}",
       link: "{$sharelink}",
       imgUrl: "{$shareimg}"
	}; 
	wx.onMenuShareAppMessage(sharedata);//分享给朋友
	wx.onMenuShareTimeline(sharedata);//分享到朋友圈
	wx.showOptionMenu();//显示右上角按钮
});
</script>
</body>
</html>
